﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using DiagramDesigner.Common.Interfaces;

namespace DiagramDesigner.Module.Toolbox.Controls
{
    public class Toolbox : ItemsControl
    {
        [ImportMany]
        public IEnumerable<Lazy<IGeometryPlugin>> ShapePlugins { get; set; }

        public Toolbox()
        {
            
        }

        private Size _defaultItemSize = new Size(50,50);
        public Size DefaultItemSize
        {
            get { return _defaultItemSize; }
            set { _defaultItemSize = value; }
        }

        protected override System.Windows.DependencyObject GetContainerForItemOverride()
        {
            return new ToolboxItem();
        }

        protected override bool IsItemItsOwnContainerOverride(object item)
        {
            return item is ToolboxItem;
        }
    }
}
